/*
 *  Platform_Input.mm
 *  Fridge
 *
 *  Created by Jeremy Abel on 6/26/12.
 *  Copyright 2012 __MyCompanyName__. All rights reserved.
 *
 */

#include "Main.h"

#include "Input.h"
//#include <AppKit/AppKit.h>

void Input::Platform_SetCursor( const INPUT_MOUSE_CURSOR xCursor )
{
	// Check what cursor we're using already
    /*
	// Change cursor
	switch ( xCursor )
	{
		case INPUT_MOUSE_CURSOR_ARROW:
		{
			[ [ NSCursor arrowCursor ] set ];
		}
		break;
		case INPUT_MOUSE_CURSOR_CARET:
		{
			[ [ NSCursor IBeamCursor ] set ]; 
		}
		break;
	}
    */
}

void Clipboard::Platform_Copy()
{
    /*
	char *clipboardText = s_szClipboard;
	
	NSString* clipboardString = [ NSString stringWithUTF8String:clipboardText ];
	
	// Get and clear pasteboard
	NSPasteboard* pasteBoard = [ NSPasteboard generalPasteboard ];
	[ pasteBoard clearContents ];
	
	// Put array with our text into the pasteboard
	NSArray *objectsToCopy = [ NSArray arrayWithObject:clipboardString ];
	BOOL OK = [ pasteBoard writeObjects: objectsToCopy ];
	
	FridgeLogf("COPY: %s", clipboardText);
    */
}

void Clipboard::Platform_Paste()
{	
    /*
	NSPasteboard *pasteBoard = [ NSPasteboard generalPasteboard ];
	NSArray *classes = [[ NSArray alloc ] initWithObjects:[ NSString class ], nil ];
	NSDictionary *options = [ NSDictionary dictionary ];
	NSArray *copiedItems = [ pasteBoard readObjectsForClasses:classes options:options ];
	
	if( copiedItems != nil )
	{
		// Get clipboard contents
		NSString* clipboardString = [ copiedItems lastObject ];
		const char* szText = [ clipboardString cStringUsingEncoding:NSUTF8StringEncoding ];
		
		// Copy to Fridge clipboard
		const int iLen = strlen( szText );
		strncpy( s_szClipboard, szText, iLen );
		s_szClipboard[ iLen ] = 0;
	}
    */
}
